#{extends 'main.html' /} #{set title:'Home' /}

<!-- @author Ayatullah marawan
this page retrieve all members with the name that registered user entered in the search bar
with button open profile next to each user to open his profile  -->


<body style="background-color: white;">
	<h1>
		<font size="3" face="New times roman" color="red"> <i> Here
				all members : </i> </font>
	</h1>

	#{ifnot usersByName}
	<p>There are no members with this mail!!</p>
	#{/ifnot} #{list items:usersByName, as:'RegisteredUser'}
	<!-- Heidi ElToukhy
This is a button that enables the user to retrieve others profile page with all its content
@author Heidi ElToukhy -->
	<form action="@{Application.seeOthersProfile()}">

		<div id="${RegisteredUser.id}">
			<ul>
				<li>
					<h4>${RegisteredUser.name}</h4></li>
			</ul>
			<ul>
				<h4>${RegisteredUser.mail}</h4>
			</ul>
			<button name="viewTheProfile" type="submit"
				value="${RegisteredUser.id}">open profile</button>
			<br>

			<hr>
		</div>
	</form>
	#{/list}
	<!-- End @author Heidi ElToukhy-->
	<a href="@{Application.viewprofile()}">Back to Profile Page</a>

</body>